import {Component} from '@angular/core'
import { StatusBar } from '@ionic-native/status-bar'

@Component({
  selector: 'page-native-status-bar',
  templateUrl: 'status-bar.html'
})
export class NativeStatusBarPage {
  overlaysWebView:boolean = true

  constructor(public statusBar: StatusBar) {
    // this.statusBar.styleDefault();
    // this.statusBar.styleBlackTranslucent()
  }

  toggleStatus(){
    let isVisible = this.statusBar.isVisible
    if(isVisible){
      this.statusBar.hide()
    }else{
      this.statusBar.show()
    }
  }

  toggleOverlaysWebView(){
    this.overlaysWebView = !this.overlaysWebView
    this.statusBar.overlaysWebView ( this.overlaysWebView)
  }

  triggerFunc(funName,arg=[]){
    this.statusBar[funName](...arg)
  }

}
